import App from './App'
import Vue from 'vue'
import './permission' // permission
import uView from 'uni_modules/uview-ui'
import directive from './directive' // directive
import plugins from './plugins' // plugins
 
import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, handleTree,selectUserDictLabel } from "@/utils/ruoyi";

Vue.use(uView)
Vue.config.productionTip = false
Vue.use(directive)
Vue.use(plugins)

App.mpType = 'app'

import store from '@/store';

// 字典标签组件
import DictTag from '@/components/DictTag'
import DictPicker from '@/components/DictPicker'
// 字典数据组件
import DictData from '@/components/DictData'
// 全局组件挂载
Vue.component('DictTag', DictTag)
Vue.component('DictPicker', DictPicker)
DictData.install()

Vue.config.productionTip = false
Vue.prototype.$store = store
const app = new Vue({
  store,
  ...App
})

Vue.prototype.selectUserDictLabel = selectUserDictLabel
Vue.prototype.selectDictLabel = selectDictLabel

// 引入请求封装，将app参数传递到配置中
require('@/config/http.interceptor.js')(app)

app.$mount()